<?php
$numArray = [85, 5, 25, 84, 9, 10];
usort($numArray, function ($left, $right) {
    if ($left == $right) {
        return 0;
    } elseif ($left < $right) {
        return - 1;
    } else {
        return 1;
    }
});

$numArray = [85, 5, 25, 84, 9, 10];
usort($numArray, function ($left, $right) {
    return $left <=> $right;
});